package edu.qd.learn.newchapter.chapter01;

/**
 * 数学 处理类
 *
 * @author 布衣
 */
public class MathImpl {

    public int deal(int x, int y, MathOperation math) {
        return math.deal(x, y);
    }

    public static void main(String[] args) {
        MathImpl m = new MathImpl();
        int deal = m.deal(1, 2, (x,y)->x+y);

        System.out.println("商" + deal);
        int sum = m.deal(1, 2, (x, y) -> x + y);
        System.out.println("和" + sum);
    }

}
